/**
 * Project: ameba.dal
 * 
 * File Created at 2015年12月14日
 * $Id$
 * 
 * Copyright 2015 dface.cn Croporation Limited.
 * All rights reserved.
 *
 * This software is the confidential and proprietary information of
 * dface Company. ("Confidential Information").  You shall not
 * disclose such Confidential Information and shall use it only in
 * accordance with the terms of the license agreement you entered into
 * with www.dface.cn
 */
package cn.dface.ameba.dal.dao;

import java.util.List;

import org.apache.ibatis.annotations.Param;

import cn.dface.ameba.dal.entity.ResourceDo;

/**
 * ResourceDAO
 * 
 * @author LVZY
 */
public interface ResourceDAO {

    public void add(ResourceDo resource);

    public Integer count(@Param("bucketId") Integer bucketId, @Param("descKey") String descKey);

    public ResourceDo findById(Integer id);

    public List<ResourceDo> findByIds(Integer[] ids);

    public List<ResourceDo> findByBucketIdAndPage(@Param("bucketId") Integer bucketId,
                                                  @Param("descKey") String descKey,
                                                  @Param("start") Integer start,
                                                  @Param("end") Integer end);

    public void deleteByIds(List<Integer> ids);

    public void deleteByBucketId(Integer id);

}
